package com.ruoyi.yzchu.domain;

import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单明细（从）对象 yzc_order_item
 * 
 * @author ruoyi
 * @date 2025-04-06
 */
public class YzcOrderItem extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 明细ID */
    private Long itemId;

    /** 订单ID（外键关联yzc_order.order_id） */
    @Excel(name = "订单ID", readConverterExp = "外=键关联yzc_order.order_id")
    private Long orderId;

    /** 商品ID（外键关联yzc_product.product_id） */
    @Excel(name = "商品ID", readConverterExp = "外=键关联yzc_product.product_id")
    private Long productId;

    /** 购买数量 */
    @Excel(name = "购买数量")
    private Long quantity;

    /** 下单时单价 */
    @Excel(name = "下单时单价")
    private BigDecimal price;

    public void setItemId(Long itemId) 
    {
        this.itemId = itemId;
    }

    public Long getItemId() 
    {
        return itemId;
    }
    public void setOrderId(Long orderId) 
    {
        this.orderId = orderId;
    }

    public Long getOrderId() 
    {
        return orderId;
    }
    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }
    public void setQuantity(Long quantity) 
    {
        this.quantity = quantity;
    }

    public Long getQuantity() 
    {
        return quantity;
    }
    public void setPrice(BigDecimal price) 
    {
        this.price = price;
    }

    public BigDecimal getPrice() 
    {
        return price;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("itemId", getItemId())
            .append("orderId", getOrderId())
            .append("productId", getProductId())
            .append("quantity", getQuantity())
            .append("price", getPrice())
            .toString();
    }
}
